home *** CD-ROM | disk | FTP | other *** search
- /* exp.c function, from p. 209 of turbo c bible */
- #include<stdio.h>
- #include<math.h>
- #include<stdlib.h> /* errno is declared here */
- main(int argc, char **argv)
- {
- double result;
-
- if(argc < 2)
- {
- printf("Usage: %s <value>\n", argv[0]);
- }
- else
- {
- result = exp(atof(argv[1]));
- printf("exp (%s) = %f \n", argv[1], result);
- }
- }